#include <stdio.h>

/*
 * 引用
 */

void f2(int x, int y, int & sum, int & product)
{
	sum = x + y;
	product = x * y;
}

int main()
{
	return 0;
}


#if 0

可以看到编译之后的代码和那个使用指针的代码完全一样（参见第10章）

#endif

#if 0
/*
 * intel
 */
0000000000001129 <_Z2f2iiRiS_>:
    1129:	f3 0f 1e fa          	endbr64 
    112d:	55                   	push   %rbp
    112e:	48 89 e5             	mov    %rsp,%rbp
    1131:	89 7d fc             	mov    %edi,-0x4(%rbp)
    1134:	89 75 f8             	mov    %esi,-0x8(%rbp)
    1137:	48 89 55 f0          	mov    %rdx,-0x10(%rbp)
    113b:	48 89 4d e8          	mov    %rcx,-0x18(%rbp)
    113f:	8b 55 fc             	mov    -0x4(%rbp),%edx
    1142:	8b 45 f8             	mov    -0x8(%rbp),%eax
    1145:	01 c2                	add    %eax,%edx
    1147:	48 8b 45 f0          	mov    -0x10(%rbp),%rax
    114b:	89 10                	mov    %edx,(%rax)
    114d:	8b 45 fc             	mov    -0x4(%rbp),%eax
    1150:	0f af 45 f8          	imul   -0x8(%rbp),%eax
    1154:	89 c2                	mov    %eax,%edx
    1156:	48 8b 45 e8          	mov    -0x18(%rbp),%rax
    115a:	89 10                	mov    %edx,(%rax)
    115c:	90                   	nop
    115d:	5d                   	pop    %rbp
    115e:	c3                   	retq   

000000000000115f <main>:
    115f:	f3 0f 1e fa          	endbr64 
    1163:	55                   	push   %rbp
    1164:	48 89 e5             	mov    %rsp,%rbp
    1167:	b8 00 00 00 00       	mov    $0x0,%eax
    116c:	5d                   	pop    %rbp
    116d:	c3                   	retq   
    116e:	66 90                	xchg   %ax,%ax

/*
 * arm
 */
00000000004005ec <_Z2f2iiRiS_>:
  4005ec:	d10083ff 	sub	sp, sp, #0x20
  4005f0:	b9001fe0 	str	w0, [sp, #28]
  4005f4:	b9001be1 	str	w1, [sp, #24]
  4005f8:	f9000be2 	str	x2, [sp, #16]
  4005fc:	f90007e3 	str	x3, [sp, #8]
  400600:	b9401fe1 	ldr	w1, [sp, #28]
  400604:	b9401be0 	ldr	w0, [sp, #24]
  400608:	0b000021 	add	w1, w1, w0
  40060c:	f9400be0 	ldr	x0, [sp, #16]
  400610:	b9000001 	str	w1, [x0]
  400614:	b9401fe1 	ldr	w1, [sp, #28]
  400618:	b9401be0 	ldr	w0, [sp, #24]
  40061c:	1b007c21 	mul	w1, w1, w0
  400620:	f94007e0 	ldr	x0, [sp, #8]
  400624:	b9000001 	str	w1, [x0]
  400628:	d503201f 	nop
  40062c:	910083ff 	add	sp, sp, #0x20
  400630:	d65f03c0 	ret

0000000000400634 <main>:
  400634:	52800000 	mov	w0, #0x0                   	// #0
  400638:	d65f03c0 	ret
  40063c:	00000000 	.inst	0x00000000 ; undefined


#endif

